import 'package:flutter/material.dart';
import 'package:hkzf_flutter/dio/room_item.dart';
import 'package:hkzf_flutter/pages/search/filter_bar/filter_drawer.dart';
import 'package:hkzf_flutter/pages/search/room/room_panel.dart';
import 'package:hkzf_flutter/widgets/search_bar/index.dart';
// 搜索页面
class SearchPage extends StatefulWidget {
  const SearchPage({super.key});

  @override
  State<SearchPage> createState() => _SearchPageState();
}

class _SearchPageState extends State<SearchPage> {
  List<RoomItem> list = [];
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      endDrawer: const FilterDrawer(),
      appBar: AppBar(
          title: SearchBarWidget(
            showLocation: true,// 展示位置按钮
            showMap: true,// 展示地图按钮
            onSearchSubmit:(value)=>{
              print('搜索提交回调:$value')
            }
          ),
          backgroundColor: Colors.white,
          actions: const [
            Text('')// 用个空文本占位，避免被AppBar的右侧默认图标覆盖
          ],
      ),
      body:const RoomPanel()
    );
  }
}